package com.stillalive.blogsystem.pojo.response;

import com.stillalive.blogsystem.common.util.DateUtils;
import lombok.Data;

import java.util.Date;

@Data
public class BlogInfoResponse {
    private Integer id;
    private String title;
    private String content;
    private Integer userId;

    // @JsonFormat(pattern = "yyyy-MM-dd")
    private Date time;
    public String getTime(){
        return DateUtils.deteFormat(time);
    }

    // 截断
//    public String getContent(){
//        return content == null? "" : content.substring(0,50);
//    }
}
